package com.example.demo.dao;

import com.example.demo.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface UserDao {
    User getUsermessage(@Param("username") String username, @Param("password")  String password);
    int registeruser(@Param("username") String username, @Param("password")  String password);
    //获取数据库的数据并给偏移量，与每页的大小
    List<User> getAllUser(@Param("username") String username,@Param("pageStart") int PageStart, @Param("pageSize") int PageSize );
   //获取用户个数
    int getUserCounts(@Param("username") String username);
    int upDatestate(@Param("id")int id,@Param("state") boolean state);
    int upDateimgpath(@Param("id")int id,@Param("imgpath") String imgpath);

    int upDateUser(int id, String role, String email);
}
